home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
xsw
/
xprocs.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-09
|
28KB
|
990 lines
/*
* @(#) xprocs.c 9.3 93/09/17 SCOINC
*/
/***************************************************************************
*
* Copyright (c) 1990-1993 The Santa Cruz Operation, Inc.
*
* All rights reserved. No part of this program or publication may be
* reproduced, transmitted, transcribed, stored in a retrieval system,
* or translated into any language or computer language, in any form or
* by any means, electronic, mechanical, magnetic, optical, chemical,
* biological, or otherwise, without the prior written permission of:
*
* The Santa Cruz Operation , Inc. (408) 425-7222
* 400 Encinal St., Santa Cruz, California 95060 USA
*
**************************************************************************/
/*
* Modification History
*
* S003, 15-Sep-93, rickra
* Added support for disk space...
*
* S002, 27-May-93, rickra
* Added support for pixmaps.
*
* S001, 01-Jan-93, rickra
* Added support for seperate windows.
* Added support for font change in help windows...
* Added CBLOCKS color.
*
* S000, 30-Sep-92, rickra
* Added copyright and modification history
* Change hard coded color referneces to user configurable.
*/
/*+-------------------------------------------------------------------------
xprocs.c - XSW X interface (fonts, colors)
Defined functions:
change_font(font_mode)
check_fonts()
init_MyFonts()
init_color()
get_color()
--------------------------------------------------------------------------*/
#include <stdio.h>
#include <X11/StringDefs.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
#include <Xm/Xm.h>
#include <Xm/MainW.h>
#include <Xm/DrawingA.h>
#include <Xm/MessageB.h>
#include "include/unixincs.h"
#include "include/resources.h"
#include "include/buttons.h"
#include "include/xprocs.h"
#include "include/xsw.h"
extern unsigned long StatCycle_msec;
extern int current_Y_offset;
extern struct NetworkXswStruct *current_server;
extern Widget sub_menu_state_list[Max_sub_menu_buttons];
extern Widget toplevel;
extern Widget general_help_widget;
extern Widget general_help_dialog;
extern Widget options_help_widget;
extern Widget options_help_dialog;
extern Widget known_help_widget;
extern Widget known_help_dialog;
extern char *xsw_basename;
int got_basic_colors = 0;
XColor colorBackground;
XColor colorForeground;
XColor colorLabel;
XColor colorDisplayMsg;
XColor colorUsers;
XColor colorTimeOfDay;
XColor colorInterval;
XColor colorActualInterval;
XColor colorActualIntervalWarning;
XColor colorActualIntervalAlarm;
XColor colorTitleBarFG;
XColor colorTitleBarBG;
XColor colorUser;
XColor colorKernel;
XColor colorBreak;
XColor colorIo;
XColor colorPio;
XColor colorSwap;
XColor colorMemUsed;
XColor colorMemUsedWarning;
XColor colorMemUsedAlarm;
XColor colorSwapUsed;
XColor colorSwapUsedWarning;
XColor colorSwapUsedAlarm;
XColor colorAvailSwapUsed;
XColor colorAvailSwapUsedWarning;
XColor colorAvailSwapUsedAlarm;
XColor colorNfile;
XColor colorNinode;
XColor colorNproc;
XColor colorNregion;
XColor colorNcblocks;
XColor colorNfileWarning;
XColor colorNinodeWarning;
XColor colorNprocWarning;
XColor colorNregionWarning;
XColor colorNcblocksWarning;
XColor colorNfileAlarm;
XColor colorNinodeAlarm;
XColor colorNprocAlarm;
XColor colorNregionAlarm;
XColor colorNcblocksAlarm;
XColor colorCacheWriteHit;
XColor colorCacheReadHit;
XColor colorCacheWriteMiss;
XColor colorCacheReadMiss;
XColor colorCacheWriteMissWarning;
XColor colorCacheReadMissWarning;
XColor colorCacheWriteMissAlarm;
XColor colorCacheReadMissAlarm;
XColor colorPSmem;
XColor colorPSmemGrowing;
XColor colorPSmemShrinking;
XColor colorPSmemNew;
XColor colorPScpuIdle;
XColor colorPScpuActive;
XColor colorPScpuNew;
XColor colorPScpuRunning;
XColor colorPSioIdle;
XColor colorPSioActive;
XColor colorPSioNew;
XColor colorDiskspaceLosing;
XColor colorDiskspaceGaining;
XColor colorDiskspaceStable;
XColor colorAuxButtonOnForeground;
XColor colorAuxButtonOnBackground;
XColor colorAuxButtonOffForeground;
XColor colorAuxButtonOffBackground;
XColor colorNumeric;
XColor colorNumericWarning;
XColor colorNumericAlarm;
XColor colorStaticNumeric;
unsigned long foreground;
unsigned long background;
int max_font = 6;
static FontStructure font_list[] =
{
{"fixed"},
{"6x10"},
{"6x12"},
{"6x13"},
{"8x13"},
{"9x15"},
{"ibm10x20"}
};
void
adjust_help_screens ()
{
Arg args[32];
int argcount;
Boolean help_set;
Widget parent_widget;
XFontStruct *Current_Font;
XmFontList Font_List;
/*
If the general help screen is not sensitive, it must be on....
*/
argcount = 0;
XtSetArg (args[argcount], XmNsensitive, &help_set);
argcount++;
XtGetValues (sub_menu_state_list[BUTTON_general_help], args, argcount);
if (help_set == 0)
{
Current_Font = XLoadQueryFont (display, current_server -> font_name);
Font_List = XmFontListCreate (Current_Font, XmSTRING_DEFAULT_CHARSET);
argcount = 0;
XtSetArg (args[argcount], XmNfontList, Font_List);
argcount++;
XtSetValues (general_help_widget, args, argcount);
parent_widget = XtParent (general_help_dialog);
argcount = 0;
XtSetArg (args[argcount], XmNminWidth, FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNmaxWidth, FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNwidth, FWIDTH * 80);
argcount++;
XtSetValues (parent_widget, args, argcount);
}
argcount = 0;
XtSetArg (args[argcount], XmNsensitive, &help_set);
argcount++;
XtGetValues (sub_menu_state_list[BUTTON_options_help], args, argcount);
if (help_set == 0)
{
Current_Font = XLoadQueryFont (display, current_server -> font_name);
Font_List = XmFontListCreate (Current_Font, XmSTRING_DEFAULT_CHARSET);
argcount = 0;
XtSetArg (args[argcount], XmNfontList, Font_List);
argcount++;
XtSetValues (options_help_widget, args, argcount);
parent_widget = XtParent (options_help_dialog);
argcount = 0;
XtSetArg (args[argcount], XmNminWidth, FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNmaxWidth, FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNwidth, FWIDTH * 80);
argcount++;
XtSetValues (parent_widget, args, argcount);
}
argcount = 0;
XtSetArg (args[argcount], XmNsensitive, &help_set);
argcount++;
XtGetValues (sub_menu_state_list[BUTTON_known_help], args, argcount);
if (help_set == 0)
{
Current_Font = XLoadQueryFont (display, current_server -> font_name);
Font_List = XmFontListCreate (Current_Font, XmSTRING_DEFAULT_CHARSET);
argcount = 0;
XtSetArg (args[argcount], XmNfontList, Font_List);
argcount++;
XtSetValues (known_help_widget, args, argcount);
parent_widget = XtParent (known_help_dialog);
argcount = 0;
XtSetArg (args[argcount], XmNminWidth, FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNmaxWidth, FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNwidth, FWIDTH * 80);
argcount++;
XtSetValues (parent_widget, args, argcount);
}
}
int
change_font (font_mode)
int font_mode;
{
int i, j;
Arg args[32];
int argcount;
Dimension shell_width, shell_height, shell_border_width;
Boolean help_set;
Widget parent_widget;
XFontStruct *Current_Font;
XmFontList Font_List;
XmString message;
Widget dialog;
int multiplier_H, old_height;
int Y_offset;
/* Turn off old font */
/*
printf ("In change_font\n");
*/
if (current_server != NULL)
{
/*
printf ("In change_font2\n");
*/
argcount = 0;
XtSetArg (args[argcount], XmNset, False);
argcount++;
XtSetValues (sub_menu_state_list[first_font_button + current_server -> current_font], args,
argcount);
current_server -> current_font = font_mode;
if (current_server -> have_res_font && (current_server -> current_font == 0))
current_server -> font_name = res.font;
else
current_server -> font_name = font_list[current_server -> current_font].font_name;
if ((current_server -> My_font = XLoadFont (display, current_server -> font_name)) != BadName)
{
/* Turn on new font */
if ((first_font_button + current_server -> current_font) > Max_sub_menu_buttons)
fprintf (stdout, "INTERNAL error # 3\n");
argcount = 0;
XtSetArg (args[argcount], XmNset, True);
argcount++;
XtSetValues (sub_menu_state_list[first_font_button + current_server -> current_font], args,
argcount);
old_height = (current_server -> test_fonts -> ascent +
current_server -> test_fonts -> descent);
current_server -> test_fonts = XQueryFont (display, current_server -> My_font);
Y_offset = current_Y_offset;
current_Y_offset = Start_Y_offset;
for (i = 0; i < current_server -> current_items; i++)
{
current_server -> DISPLAY_LIST[i].Y_offset = current_Y_offset;
current_Y_offset = current_Y_offset +
(FHEIGHT * current_server -> COMMAND_LIST[current_server -> DISPLAY_LIST[i].button_num].Y_mult);
}
for (i = 0; i < Max_state_buttons; i++)
{
if (current_server -> SEPERATE_WINDOWS_LIST[i].already_created)
{
if (current_server -> SEPERATE_WINDOWS_LIST[i].window_type == DRAWING_WINDOW)
{
argcount = 0;
XtSetArg (args[argcount], XmNheight,
&shell_height);
argcount++;
XtSetArg (args[argcount], XmNwidth,
&shell_width);
argcount++;
XtSetArg (args[argcount], XmNborderWidth,
&shell_border_width);
argcount++;
XtGetValues (
current_server -> SEPERATE_WINDOWS_LIST[i].shell_widget,
args, argcount);
XSetFont (
current_server -> SEPERATE_WINDOWS_LIST[i].display,
current_server -> SEPERATE_WINDOWS_LIST[i].gc, current_server -> My_font);
XSetForeground (current_server -> SEPERATE_WINDOWS_LIST[i].display,
current_server -> SEPERATE_WINDOWS_LIST[i].gc, background);
XFillRectangle (current_server -> SEPERATE_WINDOWS_LIST[i].display,
current_server -> SEPERATE_WINDOWS_LIST[i].pixmap,
current_server -> SEPERATE_WINDOWS_LIST[i].gc, 0, 0,
current_server -> SEPERATE_WINDOWS_LIST[i].width,
current_server -> SEPERATE_WINDOWS_LIST[i].height);
argcount = 0;
XtSetArg (args[argcount], XmNminWidth, (XtArgVal) SMALL_BOX_WIDTH);
argcount++;
if ((i == BUTTON_ps_cpu) ||
(i == BUTTON_ps_io) ||
(i == BUTTON_ps_mem) ||
(i == BUTTON_disk_space))
{
XtSetArg (args[argcount], XmNminHeight,
(XtArgVal) SMALL_BOX_HEIGHT);
argcount++;
XtSetArg (args[argcount], XmNmaxHeight,
(XtArgVal) DisplayHeight (display, screen));
argcount++;
XtSetArg (args[argcount], XmNmaxWidth,
(XtArgVal) DisplayWidth(display, screen));
argcount++;
XtSetArg (args[argcount], XmNminWidth,
(XtArgVal) 0);
argcount++;
/*
XtSetArg (args[argcount], XmNwidth,
(XtArgVal) FWIDTH * 100);
argcount++;
*/
}
else if ((i == BUTTON_cpu) ||
(i == BUTTON_wait) ||
(i == BUTTON_mem) ||
(i == BUTTON_other) ||
(i == BUTTON_cache))
{
XtSetArg (args[argcount], XmNminWidth,
(XtArgVal) FWIDTH * 29);
argcount++;
XtSetArg (args[argcount], XmNmaxWidth,
(XtArgVal) DisplayWidth (display, screen));
argcount++;
XtSetArg (args[argcount], XmNminHeight,
(XtArgVal) (FHEIGHT * current_server -> SEPERATE_WINDOWS_LIST[i].Y_mult));
argcount++;
XtSetArg (args[argcount], XmNmaxHeight,
(XtArgVal) (FHEIGHT * current_server -> SEPERATE_WINDOWS_LIST[i].Y_mult));
argcount++;
XtSetArg (args[argcount], XmNheight,
(XtArgVal) FHEIGHT *
current_server -> SEPERATE_WINDOWS_LIST[i].Y_mult);
argcount++;
}
else if (i == BUTTON_tune_var)
{
XtSetArg (args[argcount], XmNminHeight,
(XtArgVal) (FHEIGHT * current_server -> SEPERATE_WINDOWS_LIST[i].Y_mult));
argcount++;
XtSetArg (args[argcount], XmNmaxWidth,
(XtArgVal) FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNmaxHeight,
(XtArgVal) DisplayHeight (display, screen));
argcount++;
}
else
{
XtSetArg (args[argcount], XmNminHeight,
(XtArgVal) (FHEIGHT * current_server -> SEPERATE_WINDOWS_LIST[i].Y_mult));
argcount++;
XtSetArg (args[argcount], XmNmaxWidth,
(XtArgVal) FWIDTH * 80);
argcount++;
XtSetArg (args[argcount], XmNmaxHeight,
(XtArgVal) (FHEIGHT * current_server -> SEPERATE_WINDOWS_LIST[i].Y_mult));
argcount++;
}
XtSetValues (
current_server -> SEPERATE_WINDOWS_LIST[i].shell_widget,
args, argcount);
adjust_ps_button_offsets (current_server);
}
/*
fprintf(stdout,"Width = %d, Height = %d, border width = %d\n",
shell_width,
shell_height,
shell_border_width);
*/
XtResizeWidget (current_server -> SEPERATE_WINDOWS_LIST[i].shell_widget,
shell_width + 1,
shell_height,
shell_border_width);
}
}
redrawing_entire_DrawArea = 1;
/*
Need to resize the DISPLAY_LIST[?].Y_offset to new values.
Also need to resize current_Y_offset
*/
current_server -> font_change = 1;
draw_display (1, 0);
update_screen (0, 0);
current_server -> font_change = 0;
redrawing_entire_DrawArea = 0;
}
else
{
printf ("XLoadFont failed\n");
#ifdef TESTING
gct_writelog ("xswLOG");
#endif
exit (1);
}
}
else
{
argcount = 0;
XtSetArg (args[argcount], XmNset, False);
argcount++;
XtSetValues (sub_menu_state_list[first_font_button + font_mode], args,
argcount);
message = XmStringCreateSimple ("Must be connected to a server...");
argcount = 0;
XtSetArg (args[argcount], XmNmessageString, message);
argcount++;
dialog = XmCreateMessageDialog (toplevel, "message", args, argcount);
XmStringFree (message);
XtUnmanageChild (XmMessageBoxGetChild (dialog, XmDIALOG_HELP_BUTTON));
XtManageChild (dialog);
return (0);
}
/*
printf ("leaving .....change_font22\n");
*/
return (1);
}
void
check_fonts ()
{
Arg args[32];
int argcount;
XFontStruct *info;
char **list;
int i;
int count;
for (i = 0; i < max_font; i++)
{
list = XListFontsWithInfo (
display,
font_list[i].font_name,
1,
&count,
&info);
if (count <= 0)
{
if ((first_font_button + i) > Max_sub_menu_buttons)
fprintf (stdout, "INTERNAL error # 4\n");
argcount = 0;
XtSetArg (args[argcount], XmNsensitive, False);
argcount++;
XtSetValues (sub_menu_state_list[first_font_button + i], args,
argcount);
}
else
{
if ((first_font_button + i) > Max_sub_menu_buttons)
fprintf (stdout, "INTERNAL error # 4\n");
argcount = 0;
XtSetArg (args[argcount], XmNindicatorType, XmONE_OF_MANY);
argcount++;
XtSetValues (sub_menu_state_list[first_font_button + i], args,
argcount);
}
XFreeFontInfo (list, info, count);
if (list != (char **) NULL)
XFreeFontNames (list);
}
}
/*+-------------------------------------------------------------------------
init_MyFonts()
--------------------------------------------------------------------------*/
void
init_MyFonts (server_pointer)
struct NetworkXswStruct *server_pointer;
{
Arg args[32];
int argcount;
XFontStruct *info;
char **list;
int count;
int i;
if (res.font)
{
server_pointer -> have_res_font = 1;
server_pointer -> font_name = res.font;
/*
* Might as well set to true now, even if we cannot get font, we will just
* have to get fixed, and if that fails, we exit....
*/
if ((first_font_button) > Max_sub_menu_buttons)
fprintf (stdout, "INTERNAL error # 4\n");
for (i = first_font_button; i <= last_font_button; i++)
{
argcount = 0;
XtSetArg (args[argcount], XmNset, False);
argcount++;
XtSetValues (sub_menu_state_list[i], args, argcount);
}
argcount = 0;
XtSetArg (args[argcount], XmNset, True);
argcount++;
XtSetValues (sub_menu_state_list[first_font_button], args,
argcount);
list = XListFontsWithInfo (
display,
res.font,
1,
&count,
&info);
if (count <= 0)
{
fprintf (stdout, "%s: unable to open font \"%s\", using \"fixed\"....\n",
xsw_basename, res.font);
res.font = "fixed";
server_pointer -> font_name = res.font;
XFreeFontInfo (list, info, count);
if (list != (char **) NULL)
XFreeFontNames (list);
list = XListFontsWithInfo (
display,
res.font,
1,
&count,
&info);
if (count <= 0)
{
fprintf (stdout, "%s: unable to open font \"fixed\", Got to go....\n",
xsw_basename, res.font);
exit (0);
}
XFreeFontInfo (list, info, count);
if (list != (char **) NULL)
XFreeFontNames (list);
}
else
{
}
if ((server_pointer -> My_font = XLoadFont (display, res.font)) != BadName)
{
server_pointer -> test_fonts = XQueryFont (display, server_pointer -> My_font);
XSetFont (display, gc, server_pointer -> My_font);
}
else
{
printf ("XLoadFont failed\n");
#ifdef TESTING
gct_writelog ("xswLOG");
#endif
exit (1);
}
}
else
{
if ((server_pointer -> My_font = XLoadFont (display, "fixed")) != BadName)
{
server_pointer -> test_fonts = XQueryFont (display, server_pointer -> My_font);
XSetFont (display, gc, server_pointer -> My_font);
/*
* The setting of the SMALL_BOX_WIDTH... is done in "main", after
* making this call
*/
}
else
{
printf ("XLoadFont failed\n");
#ifdef TESTING
gct_writelog ("xswLOG");
#endif
exit (1);
}
}
} /* end of init_MyFonts */
Pixel
get_color (color_name, secondary_color_name)
register char *color_name;
register char *secondary_color_name;
{
XrmValue source, dest;
Pixel color_got;
source.size = strlen (color_name) + 1;
source.addr = color_name;
dest.size = sizeof (Pixel);
dest.addr = (caddr_t) & color_got;
if (!XtConvertAndStore (toplevel, XtRString, &source, XtRPixel, &dest))
{
source.size = strlen (secondary_color_name) + 1;
source.addr = secondary_color_name;
dest.size = sizeof (Pixel);
dest.addr = (caddr_t) & color_got;
if (!XtConvertAndStore (toplevel, XtRString, &source, XtRPixel, &dest))
{
if (got_basic_colors)
{
fprintf (stdout, "Could not allocate color %s \n", secondary_color_name);
return (foreground);
}
else
{
fprintf (stdout, "Could not allocate color %s \n", secondary_color_name);
return (0);
}
}
else
{
return (color_got);
}
}
else
{
return (color_got);
}
/*
return (0);
*/
}
/*+-------------------------------------------------------------------------
init_color()
--------------------------------------------------------------------------*/
void
init_color ()
{
#ifdef COLOR_MAP_16
color_map = DisplayCells (display, screen);
if (color_map < 16)
{
colorBackground.pixel = get_color (res.background, ScoBackground);
background = colorBackground.pixel;
colorForeground.pixel = get_color ("bull" /* res.foreground */ , ScoForeground);
foreground = colorForeground.pixel;
colorUser = colorForeground;
colorKernel = colorForeground;
colorBreak = colorForeground;
colorIo = colorForeground;
colorPio = colorForeground;
colorSwap = colorForeground;
colorLabel = colorForeground;
colorUsers = colorForeground;
colorTimeOfDay = colorForeground;
colorInterval = colorForeground;
colorActualInterval = colorForeground;
colorNfile = colorForeground;
colorNinode = colorForeground;
colorNproc = colorForeground;
colorNregion = colorForeground;
colorNfileAlarm = colorForeground;
colorNinodeAlarm = colorForeground;
colorNprocAlarm = colorForeground;
colorNregionAlarm = colorForeground;
colorNfileWarning = colorForeground;
colorNinodeWarning = colorForeground;
colorNprocWarning = colorForeground;
colorNregionWarning = colorForeground;
colorTitleBarFG = colorBackground;
colorTitleBarBG = colorForeground;
}
else
#endif
{
background = get_color (res.background, "ScoBackground");
foreground = get_color (res.foreground, "ScoForeground");
got_basic_colors = 1;
/* Begin configurable color parameters.... */
colorUser.pixel = get_color (res.userColor, "ScoForeground");
colorKernel.pixel = get_color (res.kernelColor, "ScoForeground");
colorBreak.pixel = get_color (res.breakColor, "ScoForeground");
colorIo.pixel = get_color (res.ioColor, "ScoForeground");
colorPio.pixel = get_color (res.pioColor, "ScoForeground");
colorSwap.pixel = get_color (res.swapColor, "ScoForeground");
colorLabel.pixel = get_color (res.labelColor, "ScoForeground");
colorMemUsed.pixel = get_color (res.memUsedColor, "ScoForeground");
colorMemUsedWarning.pixel = get_color (res.memUsedWarningColor, "ScoForeground");
colorMemUsedAlarm.pixel = get_color (res.memUsedAlarmColor, "ScoForeground");
colorSwapUsed.pixel = get_color (res.swapUsedColor, "ScoForeground");
colorSwapUsedWarning.pixel = get_color (res.swapUsedWarningColor, "ScoForeground");
colorSwapUsedAlarm.pixel = get_color (res.swapUsedAlarmColor, "ScoForeground");
colorAvailSwapUsed.pixel = get_color (res.availSwapUsedColor, "ScoForeground");
colorAvailSwapUsedWarning.pixel = get_color (res.availSwapUsedWarningColor, "ScoForeground");
colorAvailSwapUsedAlarm.pixel = get_color (res.availSwapUsedAlarmColor, "ScoForeground");
colorDisplayMsg.pixel = get_color (res.DisplayMessagesColor, "ScoForeground");
colorTitleBarFG.pixel = get_color (res.title_barfgColor, "ScoForeground");
colorTitleBarBG.pixel = get_color (res.title_barbgColor, "ScoBackground");
colorNfile.pixel = get_color (res.nfileColor, "ScoForeground");
colorNinode.pixel = get_color (res.ninodeColor, "ScoForeground");
colorNproc.pixel = get_color (res.nprocColor, "ScoForeground");
colorNregion.pixel = get_color (res.nregionColor, "ScoForeground");
colorNcblocks.pixel = get_color (res.ncblocksColor, "ScoForeground");
colorNfileAlarm.pixel = get_color (res.nfileAlarmColor, "ScoForeground");
colorNinodeAlarm.pixel = get_color (res.ninodeAlarmColor, "ScoForeground");
colorNprocAlarm.pixel = get_color (res.nprocAlarmColor, "ScoForeground");
colorNregionAlarm.pixel = get_color (res.nregionAlarmColor, "ScoForeground");
colorNcblocksAlarm.pixel = get_color (res.ncblocksAlarmColor, "ScoForeground");
colorNfileWarning.pixel = get_color (res.nfileWarningColor, "ScoForeground");
colorNinodeWarning.pixel = get_color (res.ninodeWarningColor, "ScoForeground");
colorNprocWarning.pixel = get_color (res.nprocWarningColor, "ScoForeground");
colorNregionWarning.pixel = get_color (res.nregionWarningColor, "ScoForeground");
colorNcblocksWarning.pixel = get_color (res.ncblocksWarningColor, "ScoForeground");
colorTimeOfDay.pixel = get_color (res.TimeOfDayColor, "ScoForeground");
colorUsers.pixel = get_color (res.UsersColor, "ScoForeground");
colorInterval.pixel = get_color (res.IntervalColor, "ScoForeground");
colorActualInterval.pixel = get_color (res.ActualIntervalColor, "ScoForeground");
colorActualIntervalWarning.pixel =
get_color (res.ActualIntervalWarningColor, "ScoForeground");
colorActualIntervalAlarm.pixel =
get_color (res.ActualIntervalAlarmColor, "ScoForeground");
colorCacheWriteHit.pixel = get_color (res.cache_write_hit_color, "ScoForeground");
colorCacheReadHit.pixel = get_color (res.cache_read_hit_color, "ScoForeground");
colorCacheWriteMiss.pixel = get_color (res.cache_write_miss_color, "ScoForeground");
colorCacheReadMiss.pixel = get_color (res.cache_read_miss_color, "ScoForeground");
colorCacheWriteMissWarning.pixel = get_color (res.cache_write_miss_warning_color, "ScoForeground");
colorCacheReadMissWarning.pixel = get_color (res.cache_read_miss_warning_color, "ScoForeground");
colorCacheWriteMissAlarm.pixel = get_color (res.cache_write_miss_alarm_color, "ScoForeground");
colorCacheReadMissAlarm.pixel = get_color (res.cache_read_miss_alarm_color, "ScoForeground");
colorPSmem.pixel = get_color (res.PS_mem_Color, "ScoForeground");
colorPSmemGrowing.pixel = get_color (res.PS_mem_growing_Color, "ScoForeground");
colorPSmemShrinking.pixel = get_color (res.PS_mem_shrinking_Color, "ScoForeground");
colorPSmemNew.pixel = get_color (res.PS_mem_new_Color, "ScoForeground");
colorPScpuIdle.pixel = get_color (res.PS_cpu_idle_Color, "ScoForeground");
colorPScpuActive.pixel = get_color (res.PS_cpu_active_Color, "ScoForeground");
colorPScpuNew.pixel = get_color (res.PS_cpu_new_Color, "ScoForeground");
colorPScpuRunning.pixel = get_color (res.PS_cpu_running_Color, "ScoForeground");
colorPSioIdle.pixel = get_color (res.PS_io_idle_Color, "ScoForeground");
colorPSioActive.pixel = get_color (res.PS_io_active_Color, "ScoForeground");
colorPSioNew.pixel = get_color (res.PS_io_new_Color, "ScoForeground");
colorDiskspaceLosing.pixel =
get_color (res.disk_space_losing_Color, "ScoForeground");
colorDiskspaceGaining.pixel =
get_color (res.disk_space_gaining_Color, "ScoForeground");
colorDiskspaceStable.pixel =
get_color (res.disk_space_stable_Color, "ScoForeground");
colorAuxButtonOnForeground.pixel = get_color (res.auxButtonOnFG, "ScoForeground");
colorAuxButtonOnBackground.pixel = get_color (res.auxButtonOnBG, "ScoBackground");
colorAuxButtonOffForeground.pixel = get_color (res.auxButtonOffFG, "ScoForeground");
colorAuxButtonOffBackground.pixel = get_color (res.auxButtonOffBG, "ScoBackground");
colorNumeric.pixel = get_color (res.numericColor, "ScoForeground");
colorNumericWarning.pixel = get_color (res.numericWarningColor, "ScoForeground");
colorNumericAlarm.pixel = get_color (res.numericAlarmColor, "ScoForeground");
colorStaticNumeric.pixel = get_color (res.staticNumericColor, "ScoForeground");
}
} /* end of init_color */
/* vi: set tabstop=4 shiftwidth=4: */
/* end of xprocs.c */